/**
 * 
 */
package com.viettel.core.enumtype;

import java.util.HashMap;
import java.util.Map;


/**
 *  Mo ta muc dich cua lop (interface)
 *  @author: ToanTM1
 *  @version: 2.1
 *  @since: 2.1
 */
public enum ChargingHistoryStatus {
    
	FAILED(-1),
	
	SUCCESS (0);
    
    /** The value. */
    private Integer value;
    
    /** The values. */
    private static Map<Integer, ChargingHistoryStatus> values = null;
    
    /**
     * Gets the value.
     * 
     * @return the value
     */
    public Integer getValue() {
        return value;
    }
    
    /**
     * Instantiates a new gender type.
     * 
     * @param value
     *            the value
     */
    ChargingHistoryStatus(Integer value) {
        this.value = value;
    }
    
    /**
     * Parses the value.
     * 
     * @param value
     *            the value
     * @return the gender type
     */
    public static ChargingHistoryStatus parseValue(Integer value) {
        if (values == null) {
            values = new HashMap<Integer, ChargingHistoryStatus>(
                    ChargingHistoryStatus.values().length);
            for (ChargingHistoryStatus e : ChargingHistoryStatus.values())
                values.put(e.getValue(), e);
        }
        return values.get(value);
    }
}
